<template>
  <view class="container">
    <view class="title">{{ info.title }}</view>
    <view class="time">{{ info.create_time }}</view>
    <view class="content">
      <rich-text space="nbsp" :nodes="info.content"></rich-text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      info: []
    };
  },

  onLoad: function (options) {
    var id = options.id;

      this.$http.post('/index/Api/articleDetail', {id}).then(res => {
        if (res.data.result == 1) {
          this.info = res.data.data;
        } else {
          this.$common.doErrorResult(res);
        }
      })

  },

  methods: {},
}
</script>

<style lang="scss">
.container {
  padding: 0 20rpx;

  .title {
    text-align: center;
    font-size: 32rpx;
    font-weight: bold;
    margin-top: 20rpx;
  }

  .time {
    text-align: center;
    color: #999;
    margin-top: 20rpx;
  }

  .content {
    margin-top: 20rpx;

  }
}
</style>

